<?php
/*
*************道达快递运单页面*******************
*/
class kd_orderApp extends BackendApp
{
    function index()//快递运单号查询
    {
	
		$ydh = empty($_GET['ydh']) ? '' : htmldecode($_GET['ydh']);
		if($ydh)
		{
			$ydh = str_replace("\r","",$ydh);//textarea换行
			$ydh = str_replace("\n",",",$ydh);//textarea换行
			$ydh = str_replace("/",",",$ydh);//斜杠换行
			$ydh = str_replace("、",",",$ydh);//按钮的斜杠、换行
			$ydh = rtrim($ydh,",");
			$this->assign('get_ydh', $ydh);//赋值给百度查询
			$mod_kd_order =& m('kd_order');
			$yundan_list = $mod_kd_order->findAll(array(
				'fields'        => 'this.*',
				'conditions'    => db_create_in($ydh,'yundanhao','text'),
				'limit'         => '0,1', 
				'include'       =>  array(
				   'has_kdwuliu', //取出物流信息
				 ),	
			));	

			$this->assign('yundan_list', $yundan_list);
		}

		$location = array( 0 => array( 'text' => '运单查询' ,'url' => 'yundan.html') );
		$this->_config_seo(array( 'title' => '运单查询 - ' . Conf::get('site_name') ));	
		$this->assign('curitem', "运单查询");		
		$this->import_resource(array( 'style' =>  'res:style/css_wap.css' ));	
		$this->display('kd_order.yundanhao.html');
	}	

}
?>